﻿<UserControl x:Class="Wulong.Phone.Qiushi.Views.QiushiSectionsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">
    <UserControl.Resources>
        <Style x:Key="SectionListStyle" TargetType="ListBox">
            <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
            <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
            <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeExtraLarge}"/>
            <Setter Property="Margin" Value="12,17,0,28"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="Padding" Value="5"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBox">
                        <ScrollViewer x:Name="ScrollViewer" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Padding="{TemplateBinding Padding}">
                            <ItemsPresenter/>
                        </ScrollViewer>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <ListBox x:Name="QiushiSections" SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}" cal:Message.Attach="[Event SelectionChanged]=[Action NavigateToQiushiListView($this.SelectedIndex)]" Style="{StaticResource SectionListStyle}">
            <ListBoxItem Content="{Binding AppI18N.VM_QiushiSection_Latest, Source={StaticResource ls}}"/>
            <ListBoxItem Content="{Binding AppI18N.VM_QiushiSection_8hrs, Source={StaticResource ls}}"/>
            <ListBoxItem Content="{Binding AppI18N.VM_QiushiSection_24hrs, Source={StaticResource ls}}"/>
            <ListBoxItem Content="{Binding AppI18N.VM_QiushiSection_WeeklyHottest, Source={StaticResource ls}}"/>
            <ListBoxItem Content="{Binding AppI18N.VM_QiushiSection_MonthlyHottest, Source={StaticResource ls}}"/>
            <ListBoxItem Content="{Binding AppI18N.VM_QiushiSection_Picstory, Source={StaticResource ls}}"/>
        </ListBox>
    </Grid>
</UserControl>
